package com.daka.controller;

import com.daka.service.ActivityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by yangx
 * Date: 2016/8/1 0001
 * Time: 11:05
 */

@Controller
@RequestMapping("/activity")
@Slf4j
public class ActivityController
{

    @Autowired
    private ActivityService activityService;

    @ResponseBody
    @RequestMapping(value = "/test")
    public String test() {
        System.out.println("hello");
        return "<a href='http://localhost:9088/unicorn/activity/importActivity'>ImportStart</a>";
    }

    @ResponseBody
    @RequestMapping(value = "/importActivity")
    public String importActivity() {
        this.activityService.importActivity();
        return "hello";
    }
}







